<?php // app/plugins/views/content_posts/system_index.ctp ?>

<div class="flash">
	<?php $this->Session->flash();?>
</div>
<div id="list-area" class="list-wrapper">
	<?php echo $this->Html->link('Add Post', '/system/content/content_posts/edit');?>
	<div class="list-pager-top">
		<?php 
			echo $paginator->counter(array(
				'format' => 'Page %page% of %pages%, showing %current% records out of
				%count% total, starting on record %start%, ending on %end%'
			)); 
		?>
	</div>
	<table id="system_manage_user">
		<tr>
			<th>Seo Link</th>
			<th>Name</th>
			<th>Created</th>
			<th>Edit</th>
		</tr>
		<?php foreach($data as $page) : ?>
			<tr>
				<td><?php echo $page['ContentPost']['seo_name']?></td>
				<td><?php echo $page['ContentPost']['title']?></td>
				<td><?php echo $page['ContentPost']['created']?></td>
				<td>
					<?php echo $this->Html->link('Edit' , '/system/content/content_posts/edit/' . $page['ContentPost']['id'])?>
				</td>
			</tr>
		<?php endforeach;?>
	</table>
	<div class="list-pager-bottom">
		    <!-- Shows the page numbers -->
		    <?php echo $paginator->numbers(); ?>
		    <!-- Shows the next and previous links -->
		    <?php
		    echo $paginator->prev('« Previous ', null, null, array('class' => 'disabled'));
		    echo $paginator->next(' Next »', null, null, array('class' => 'disabled'));
		    ?>
		    <!-- prints X of Y, where X is current page and Y is number of pages -->
		    <?php echo $paginator->counter(); ?>
	</div>
</div>
<?php echo $this->Html->script('pages/system_manage.js', array('inline' => false));?>